<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Weather Information</title>
</head>
<body>
	<p>Here is the weather information</p>
    <form method="post" action="showWeather">
        <p>
            <span>ZIP Code:</span> <input type="text" name="zip"/>
            <c:out value="${message}"/>
        </p>
        <p><input type="submit" value="Submit"/></p>
        <p><c:out value="${weatherInfo}"/></p>
    </form>
    <a href="<spring:url value="shopping" htmlEscape="true"/>">Shopping</a>
    <table>
    	<c:forEach var="w" items="${weatherList}">
    		<tr>
    			<td>${w.city}</td>
    			<td>${w.temperature}</td>
    		</tr>
    	</c:forEach>
    </table>
    
    
    <p>Here is the News information</p>
    <form method="post" action="showNews">
        <p>
            <span>Key Code:</span> <input type="text" name="key"/>
            <c:out value="${message}"/>
        </p>
        <p><input type="submit" value="Submit"/></p>
        <p><c:out value="${newsInfo}"/></p>
    </form>
</body>
</html>















